package com.gzcss.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.gzcss.common.utils.PageUtils;
import com.gzcss.gulimall.product.entity.AttrEntity;
import com.gzcss.gulimall.product.entity.ProductAttrValueEntity;
import com.gzcss.gulimall.product.vo.AttrRespVo;
import com.gzcss.gulimall.product.vo.AttrVo;
import com.gzcss.gulimall.product.vo.attrGroupRelationVo;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author GGH
 * @email 1421938824@qq.com
 * @date 2022-04-15 10:27:34
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void saveAttr(AttrVo attr);

    PageUtils queryBaseAttr(Map<String, Object> params, Long catelogId, String type);

    AttrRespVo getAttrInfo(Long attrId);

    void updateAttr(AttrVo attr);

    List<AttrEntity> getRelationAttr(Long attrgroupId);

    void deleteRelation(attrGroupRelationVo[] vos);


    PageUtils getNoRelationAttr(Map<String, Object> params, Long attrgroupId);

    /**
     *  查询attr中可以被检索的属性
     * @param attrids
     * @return
     */
    List<Long> selectSearchAttrids(List<Long> attrids);
}

